Ext.define('Admin.view.system.vote.VoteForm', {
    extend: 'Admin.ux.form.FormPanel',
    xtype: 'vote-form',
    items: [
    	{	xtype:'hiddenfield',name:'id'	},
        {
            xtype: 'textfield',
            name:'vote_name',
            fieldLabel: '投票标题',
            emptyText:'请输入投票标题',
            maxLength:100
        },
        {
	        xtype: 'htmleditor',
	        name:'vote_content',
	        fieldLabel: '投票简介',
	        allowBlank:false,
	        enableColors: true,
	        enableAlignments: true
	    },
	    {
	        xtype: 'datetimefield',
	        format:'Y-m-d H:i:s',
	        fieldLabel:'开始时间',
	        todayText: '选择当前时间',
	        minValue: new Date(),
            hourText: '小时',
            minuteText: '分钟',
	        name: 'start_time',
	    },
	    {
	        xtype: 'datetimefield',
	        format:'Y-m-d H:i:s',
	        fieldLabel:'结束时间',
	        todayText: '选择当前时间',
            hourText: '小时',
            minuteText: '分钟',
	        name: 'end_time',
	    },
	    {
	        xtype: 'tagfield',
	        fieldLabel: '选择角色',
	        emptyText:'请选择角色',
	        id:'role_id',
	        displayField: 'role_name',
	        valueField: 'id',
	     	queryMode: 'local',
	        minChars :1,
	        remoteFilter: true,
	        editable :true,
	        forceSelection :true,
         	filterPickList: true,
	        name:'role_id',
	        store: Ext.create('Ext.data.Store',{
	        	 fields: ['id','role_name'],
	        	 proxy: {
			        type: 'ajax',
			        url: '/role/json',
			        reader: {
			            type: 'json'
			        }
			    },
			    autoLoad:true
	        })
	    }
    ]
});
